package org.springblade.modules.customer.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.common.entity.DictVO;
import org.springblade.core.tool.utils.DateUtil;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

/**
 * 客户表实体类
 *
 * @author armyant
 * @since 2024-04-21
 */
@Data
@EqualsAndHashCode
@Api(tags = "客户表", value = "视图模型")
public class CustomerVO implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "头像")
	private String avatar;

	@ApiModelProperty(value = "生日")
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private LocalDate birthday;

	@ApiModelProperty(value = "客户编号")
	private String code;


	@ApiModelProperty(value = "创建时间")
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
	private LocalDate createTime;


	@ApiModelProperty(value = "客户所属公海")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long customerGroup;

	@ApiModelProperty(value = "客户详情")
	private String detail;

	@ApiModelProperty(value = "邮箱")
	private String email;

	@ApiModelProperty(value = "主键")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	@ApiModelProperty(value = "身份证号码")
	private String idCard;

	@ApiModelProperty(value = "客户标签，以json格式存储")
	private List<DictVO> label;

	@ApiModelProperty(value = "客户级别（参考数据字典level_dict）")
	private Integer levelDict;

	@ApiModelProperty(value = "手机")
	private String mobile;

	@ApiModelProperty(value = "客户座机")
	private String phone;

	@ApiModelProperty(value = "备注")
	private String remark;

	@ApiModelProperty(value = "性别")
	private Integer sex;

	@ApiModelProperty(value = "状态（参考数据字典status_dict）")
	private Integer statusDict;

	@ApiModelProperty(value = "租户ID")
	private String tenantId;

	@ApiModelProperty(value = "修改时间")
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
	private LocalDate updateTime;

	@ApiModelProperty(value = "修改人")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long updateUser;

}
